import request from '@/request';
import type {editFormData , addFormData} from '../@types/index';

/**获取协议*/
export const getProtocol = (params: { page: number, pageSize: number , title ?: string , type ?: string}) => {
    return request({
        url: '/api/v2/admin/getProtocol',
        method: 'get',
        params
    })
} 

/**添加协议*/
export const addProtocol = (data: addFormData ) => request({
    url: '/api/v2/admin/addProtocol',
    method: 'post',
    data
}) 

/**删除协议*/
export const delProtocol = (data: { ID: string }) => request({
    url: '/api/v2/admin/delProtocol',
    method: 'post',
    data
})

/**更新协议*/
export const updateProtocol = (data: editFormData) => request({
    url: '/api/v2/admin/updateProtocol',
    method: 'post',
    data
})